
function Pos(x, y) {
    this.x = x;
    this.y = y;
}

class Rect {
    constructor(x, y, w, h) {
        this.x = Math.floor(x);
        this.y = Math.floor(y);
        this.w = Math.floor(w);
        this.h = Math.floor(h);
    }
    getCenterPos() {
        return new Pos(this.x + this.w/2, this.y + this.h/2);
    }
}

class ColorInfo {
    constructor(textColor, bgColor) {
        this.textColor = textColor;
        this.bgColor = bgColor;
    }

    
}

class DrawTextInfo {
    constructor(text, textSize, textColor) {
        this.colorInfo = new ColorInfo();
        this.rect = null;
        this.text = text;
        this.textSize = textSize;
        this.textColor = textColor;
    }

    getCenterPos = function() {
        return this.rect.getCenterPos();
    }
}

class IntRange {
    constructor(min, max) {
        this.min = min;
        this.max = max;
    }
}